pub fn new_birthday_probability(n: u32) -> f64 {

    //避免100项以上的复杂计算
    if n >= 100 {
        1.0
    }else {
        //避免大数计算，使用对数计算
        let all = n as f64*365.0_f64.log(300_f64);
        let no_collision = (0..n).fold(0_f64, |acc, x| {
            acc + ((365 - x )as f64).log(300_f64)
        });
        println!("all{:?}, no_collision{:?}", all, no_collision);
        let probability = 1.0 - 300_f64.powf(no_collision-all);
        println!("probability{:?}", probability);
        probability
    }
}
